package com.aaa.system.controller;

import com.aaa.common.entity.Dept;
import com.aaa.common.vo.Result;
import com.aaa.system.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: aaa-hospital-parent
 * @description:
 * @author: 闫克起
 * @create: 2024-05-22 14:33
 **/
@RestController
@RequestMapping("/system/dept")
public class DeptController {

    @Autowired
    private DeptService deptService;

    @GetMapping("/list")
    public Result<List<Dept>> list(){
        return deptService.findAll();
    }
}
